def regretGrades(full_grade_list,student_grades):
    '''
    :param full_grade_list:c写的那个文件的返回（list）
    :param student_grade_list:getStudentGrades的返回
    :return:规范化成绩
    ''' 
    link_counts=len(full_grade_list)
    topic_list = []
    for i in range(link_counts):
        link_full_grade=float(full_grade_list[i][1])
        for j in range(3,len(full_grade_list[i]),4):
             weight=float(full_grade_list[i][j][2])
             for item in full_grade_list[i][j][3:]:
                 temp=float(item[2])/float(item[1])
                 temp=temp*weight*link_full_grade
                 topic_list.append(temp)

    regret_grades=[]
    for i in student_grades:
        temp=list(map(lambda x,y:x*y,i,topic_list))
        regret_grades.append(temp)
    return regret_grades

# import json
# from getStudentGrades import student_grades
# path='/home/zzc/env/bin/ClassManager-main/new/full_grades.json'
# f = open(path)
# m = json.load(f)
# regret_grades=regretGrades(m, student_grades)
